<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Gtw(car, house) {
            this.car = car;
            this.house = house;
        }
        // a.call(b，ag1,ag2); b继承a，ag1和ag2是a中函数对应的参数
        function Son (name) {
            this.name = name;
            // this 是son的实例
            Gtw.call(this, 'R10', '别野')
        }
        var gyn = new Son('高衙内');
        console.log(gyn);
    </script>
</body>
</html>